<template>
  <div class="list">
    <div
      v-for="v of $store.state.newList.list"
      :key="v.art_id"
      class="article_item"
    >
      <h3 class="van-ellipsis">{{ v.title }}</h3>
      <!-- 只要这个 type 不等于 0 就说明有图片 -->
      <div class="img_box" v-if="v.cover.type !== 0">
        <img
          v-for="(v2, i2) of v.cover.images"
          :key="i2"
          :src="v2"
          :class="{ w100: v.cover.type === 1, w33: v.cover.type === 3 }"
        />
      </div>
      <!---->
      <div class="info_box">
        <span>13552285417</span>
        <span>{{ v.comm_count }}评论</span>
        <span>{{ v.pubdate }}</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'NewList',
  created() {
    // this.$store.dispatch('newList/getList', this.$store.state.category.activeId)
    this.$store.dispatch('newList/getList')
  },
}
</script>
